package apps.reading.db;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;


@Entity
@Table(name="t_websourcebean")
public class WebSourceBean {
	
	public static Map<String,String> typeMap=new HashMap<String,String>();
	public static final String TYPE_NEWS1="0";
	public static final String TYPE_NEWS_TOPVIEWS="1";

	public static Map<String,String> sourceTypeMap=new HashMap<String,String>();
	public static final String SOURCE_TYPE_CNBLOG="0";	
	public static final String SOURCE_TYPE_SELF="1";	
	
	static {
		typeMap.put(TYPE_NEWS1, "最新新闻");
		typeMap.put(TYPE_NEWS_TOPVIEWS, "48小时阅读排行");
		sourceTypeMap.put(SOURCE_TYPE_CNBLOG, "博客园");
		sourceTypeMap.put(SOURCE_TYPE_SELF, "原创");
	}	
	
	/**
	 * 主键
	 */
	@Id
	private String id;
	/**
	 * 文章标题
	 */
	private String title;
	/**
	 * 备注
	 */
	private String remark;
	/**
	 * 作者
	 */
	private String author;
	/**
	 * 发布时间
	 */
	private Date publicDate;
	/**
	 * 文章正文
	 */	
	private String content;
	/**
	 * 文章正文链接
	 */	
	private String contentURL;
	
	/**
	 * 作者发布地址
	 */
	private String excerptsUrl;
	
	/**
	 * 类型
	 */	
	private String type;
	/**
	 * 来源类型
	 */	
	private String sourceType;
	
	
	@Override
	public String toString() {
		return "WebSourceBean [author=" + author + ", content=" + content
				+ ", contentURL=" + contentURL + ", excerptsUrl=" + excerptsUrl
				+ ", id=" + id + ", publicDate=" + publicDate + ", remark="
				+ remark + ", sourceType=" + sourceType + ", title=" + title
				+ ", type=" + type + "]";
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}

	public Date getPublicDate() {
		return publicDate;
	}
	public void setPublicDate(Date publicDate) {
		this.publicDate = publicDate;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getContentURL() {
		return contentURL;
	}
	public void setContentURL(String contentURL) {
		this.contentURL = contentURL;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getSourceType() {
		return sourceType;
	}
	public void setSourceType(String sourceType) {
		this.sourceType = sourceType;
	}
	public String getExcerptsUrl() {
		return excerptsUrl;
	}
	public void setExcerptsUrl(String excerptsUrl) {
		this.excerptsUrl = excerptsUrl;
	}
	
	
	
}
